import Login from '@/components/Login.vue'
import NotFound from '@/components/NotFound.vue'
import Home from '@/components/Home.vue'
import Index from '@/components/Index.vue'
import User from '@/components/User.vue'
import File from '@/components/File.vue'
import Storage from '@/components/Storage.vue'
import Person from '@/components/Person.vue'
import Artist from '@/components/Artist.vue'
import Update from '@/components/Update.vue'
import Shufa from '@/components/shufa.vue'
import Guohua from '@/components/guohua.vue'
import Wenxue from '@/components/wenxue.vue'

var routes = [{
        path: '/login',
        component: Login,
        name: '',
        hidden: true //隐藏
    },
    {
        path: '/404',
        component: NotFound,
        name: '404',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        redirect: '/index',
        name: '',
        hidden: true
    },
    {
        path: '/index',
        component: Home,
        children: [
            { path: '/', component: Index, name: '主页' }
        ],
        hidden: true
    },{
        path: '/',
        component: Home,
        leaf: true, //只有一个节点
        children: [
            { path: '/user', component: User, name: '用户管理' }
        ]
    },{
        path: '/',
        component: Home,
        name: '文章管理',
        children: [
            { path: '/person', component: Person, name: '个人简介' },
            { path: '/artist', component: Artist, name: '艺术道路 ' },
        ]
    },{
        path: '/',
        component: Home,
        name: '作品上传',
        children: [
            { path: '/shufa', component: Shufa, name: '书法' },
            { path: '/guohua', component: Guohua, name: '国画' },
            { path: '/wenxue', component: Wenxue, name: '文学' }
        ]
    }
]

export default routes;
